<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .fa {
      width: 500px;
      height: 300px;
      background-color: pink;
    }
    .ch {
      width: calc(100% - 100px); /* 渲染出来后，宽度是 400px，100%相对于父元素*/
      height: 100px;
      background: green;
    }
  </style>
</head>
<body>
  <div class="fa">
    <div class="ch"></div>
  </div>


</body>
</html>